<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>测试机申请</title>
<import file="js.My97DatePicker.WdatePicker" />
<import file="js.jquery" />
<import type="css" file="css.workform" />
</head>

<body>
<form action="__URL__/audit_insert" method="post" name="form1" onsubmit="return CheckForm();">
  <div style="width: 725px;margin: 0 auto;text-align: right;padding-bottom: 10px">
    <span style="width:725px;text-align:right;">直属销售: <input type="text" size="10" name="higher" class="BigInput apply" value="{$data['higher']}"></span>
  </div>
  <table align="center" border="0" width="725" cellpadding="2" cellspacing="1" align="center" bgcolor="#000000" class="TableBlock">
    <tr>
    	<td class="TableContent">申请人</td>
    	<td class="TableData" style="width: 200px;">{$data['apply_username']}</td>
    	<td class="TableContent">申请日期</td>
    	<td class="TableData">{$data.apply_date}</td>
    </tr>
    <tr>
     <td nowrap class="TableContent"> 设备类型：</td>
      <td class="TableData" nowrap colspan="3">
        <if condition="$data['type'] eq '1'">统一安全管理与综合审计系统<else />数据库审计系统</if>
      </td>
    </tr>
    <tr>
     <td nowrap class="TableContent"> 产品型号：</td>
      <td class="TableData" nowrap colspan="3">
        <span class="model"></span>
      </td>
    </tr>
    <tr>
      <td nowrap class="TableContent"> 功能需求：</td>
      <td class="TableData" colspan="3" style="width: 550px">
        {$data.demand}
      </td>
    </tr>
    <tr>
      <td nowrap class="TableContent"> 客户名称：</td>
      <td class="TableData" colspan="3">
        <input type="text" name="client_name" size="64" value="{$data.client_name}" class="BigInput apply" >
      </td>
    </tr>
    <tr>
      <td nowrap class="TableContent"> 合作伙伴：</td>
      <td class="TableData" colspan="3">
      	<textarea rows="4" cols="50" name="partner" class="apply" >{$data.partner}</textarea>
      </td>
    </tr>
    <tr>
      <td nowrap class="TableContent"> 测试地点：</td>
      <td class="TableData" colspan="3">
        <input type="text" name="place" size="40" value="{$data.place}" class="BigInput apply" >
      </td>
    </tr>
    <tr>
      <td nowrap class="TableContent"> 预计归还时间：</td>
      <td class="TableData" colspan="3">
        <input type="text" name="back_time" size="23" class="BigInput apply" value="{$data.back_time}" onClick="WdatePicker()" >&nbsp;&nbsp;共计借测&nbsp;&nbsp;<input type="text" name="back_weekly" size="4" value="{$data.back_weekly}" class="BigInput apply" >&nbsp;&nbsp;周
      </td>
    </tr>
    <tr>
      <td nowrap class="TableContent"> 申请原因：</td>
      <td class="TableData" colspan="3">
        <textarea rows="4" cols="50" name="reason" class="apply" >{$data.reason}</textarea>
      </td>
    </tr>
    <tr>
      <td nowrap class="TableContent"> 负责人签字：</td>
      <td class="TableData" colspan="3">
        <span style="padding-right: 70px;"><font color='#00CD00'><b>同意</b></font></span>
        	原因：<input type="text" name="higher_sign_reason" size="34" value="{$data.higher_sign_reason}" class="BigInput apply" >
      </td>
    </tr>
    <tr>
      <td nowrap class="TableContent"> 公司审批：</td>
      <td class="TableData" colspan="3">
      	<div style="color: red">请注意，当前测试机申请已超出该区域的测试机授权数量</div>
        <label><input type="radio" name="audit" value="1" <if condition="$data['audit'] eq 1" >checked</if> >同意</label>
        <label><input type="radio" name="audit" value="0" <if condition="$data['audit'] eq 0" >checked</if> >否决</label>&nbsp;
        	原因：<input type="text" name="audit_reason" size="34" value="{$data.audit_reason}" class="BigInput sign" >
      </td>
    </tr>
    <tr class="TableControl">
      <td nowrap colspan="4" align="center">
      	<input type="hidden" value="{$action}" name="action" >
      	<input type="hidden" value="{$data.id}" name="id" >
      	<input type="hidden" value="{$data.status}" name="status" >
      	<input type="hidden" value="{$data.dept_id}" name="dept_id" >
      	<input type="hidden" value="1" name="way" >
        <input type="submit" value="保存" onclick="changeway(1)" class="BigButton">&nbsp;&nbsp;&nbsp;
        <input type="submit" value="提交" onclick="changeway(2)" class="BigButton">&nbsp;&nbsp;&nbsp;
      </td>
    </tr>
    </table>
</form>

</body>
<script type="text/javascript">
$(document).ready(function(){
	$(".apply").attr('readonly',true);
	$(".apply").css("background-color","#F2F2F2");
	
	$.getJSON("__APP__/Device/gettype?type="+{$data['type']},function(result){
		$.each(result, function(i,value){
			$(".model").html(value.name);
		});
	});
});
function changeway(value){
	$("input[name='way']").val(value);
}
</script>
</html>